<template>
	<view>

		<navigator class="goods_item" url="/pages/good-info/good-info">
			<u-image class="u-skeleton-fillet" width="100%" height="300rpx" :src="item.cover_url" />

			<view class="title u-line-1 u-skeleton-rect">
				{{item.title ? item.title :'商品名称'}}
			</view>
			<view class="goods_sbox">
				<view class="price u-skeleton-rect">￥ {{item.price}}</view>
				<view class="num u-skeleton-rect">x </view>
			</view>
		</navigator>

	</view>
</template>

<script>
	export default {
		name: "goods-card",
		props:{
			item:{
				type:Object,
				required:true
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="less">
	.goods_item {
		padding: 40rpx;
		margin-top: 30rpx;
		box-shadow: 0 12rpx 20rpx 0 rgba(0, 0, 0, .1);
        background-color: #FFFFFF;
		.title {
			margin: 20rpx 0;
			font-weight: 500;
			font-size: 32rpx;
			width: 100%;

		}

		.goods_sbox {
			display: flex;
			justify-content: space-between;

			.price {
				color: red;
				width: 40%;
			}

			.num {
				padding-left: 20px;
				color: #888;
				width: 40%;
			}
		}
	}
</style>
